﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SpikerApp
{
    public partial class SecurityModule : Form
    {
        public SecurityModule()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void SecurityModule_Load(object sender, EventArgs e)
        {

        }

        private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            var tab = sender as TabControl;

            if (tab == null) return;

            switch (tab.SelectedTab.Text.ToLower())
            {
                case "users":
                    PrepareUserTab();
                    break;

                case "security":
                    break;
            }
        }

        private void PrepareUserTab()
        {
            var secDataProvider = new AIPASoft.DataProvider.SecurityDataProvider();
            var users = secDataProvider.GetAllUsers();

            foreach (var user in users)
            {
                
            }
        }
    }
}
